
<template>
	<view>
		<!-- 场馆主首页 -->
		<venueMaster ref="venueMaster" v-if="identity === 2" ></venueMaster>
		<!-- 教练指导员 -->
		<coachMaster ref="coachMaster" v-if="identity === 3" ></coachMaster>
		<!-- 商家 -->
	</view>
	
</template>

<script>
	//场馆主首页
	import venueMaster from '@/pages/index/home/venueMaster/venueMaster.vue'
	//教练、指导员(暂时废弃，现在调用的都是index下coach.vue作为首页)
	import coachMaster from '@/pages/index/home/coachMaster/coachMaster.vue'
	export default {
		components:{
			venueMaster,
			coachMaster
		},
		data() {
			return {
				//身份（1：普通用户，2：场馆主，3：教练员，4：指导员，5：体检中心）
				identity: null,
			}
		},
		onLoad() {
		
		},
		onShow() {
			var identity = uni.getStorageSync('identity');
			this.identity = identity;
			if(identity == 2){
				//登陆人为场馆主，触发初始化方法
				this.$nextTick(() => {
					this.$refs.venueMaster.venueInitData();
				})
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
	
</style>
